<?php

namespace plugin\muadmin\app\common\model;

use think\Model;

class SysConfigGroup extends Model
{
    protected $name = 'config_group';
    protected $pk = 'id';
    protected $autoWriteTimestamp = 'datetime';
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    public static function onAfterInsert($model)
    {
        if(empty($model->weigh)){
            $model->weigh = $model->id;
            $model->save();
        }
    }
}